;;      基本配置   ;;;;;;;
;;                     ;;
;;;;;;;;;;;;;;;;;;;;;;;;;

;;以Server 模式启动emacs
(require 'server)
(or (server-running-p)
    (server-start))

;;显示列号
(setq mouse-yank-at-point t)

;;标题栏显示buffer名字
(setq frame-title-format "emacs@%b")

;;关闭启动画面
(setq inhibit-startup-message t)

;;自动打开和显示图片
(auto-image-file-mode)

;;不显示toolbar
;;(setq tool-bar-mode nil)
(tool-bar-mode -1)
;;不显示menubar
;;(setq menu-bar-mode nil)

;;语法亮亮
(global-font-lock-mode t)

;;显示与之匹配的括号
(show-paren-mode t)
(setq show-paren-style 'parenthess)

;;不产生备份文件
(setq make-backup-files nil)
;;启动最大化
;(setq initial-frame-alist '((top . 0) (left . 0) (width . 160) (height . 70)))
(run-with-idle-timer 0 nil 'w32-send-sys-command 61488)  

;;设置文件编码格式

;;设定语言环境为utf-8
(setq current-language-environment "UTF-8")
(setq default-input-method "chinese-py")
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

;;使用Ibuffer
(global-set-key (kbd "C-x C-b") 'ibuffer)
(autoload 'ibuffer "ibuffer" "List buffers." t)

;; Emacs光标样式设置
;; http://emacser.com/cursor-change.htm
(add-to-list 'load-path "~/my-site-start.d/cursor-chg")
(require 'cursor-change)
(cursor-change-mode 1)